//**********************************************************************************
// Klasse OutputSelectListOrderPanel - Panel für RadioButtons
//
//
//**********************************************************************************

package binarytree.view.output;

import java.awt.event.ActionListener;
import javax.swing.ButtonGroup;
import javax.swing.JPanel;

public class OutputSelectListOrderPanel extends JPanel {

    InOrderRadioButton inOrderRadioButton;
    PreOrderRadioButton preOrderRadioButton;
    PostOrderRadioButton postOrderRadioButton;
    
    public OutputSelectListOrderPanel() {
        
        inOrderRadioButton = new InOrderRadioButton();
        preOrderRadioButton = new PreOrderRadioButton();
        postOrderRadioButton = new PostOrderRadioButton();
        
        ButtonGroup group = new ButtonGroup();
        group.add(inOrderRadioButton);
        group.add(preOrderRadioButton);
        group.add(postOrderRadioButton);
        
        add(inOrderRadioButton);
        add(preOrderRadioButton);
        add(postOrderRadioButton);
        setSize(200, 200);
        
    }
    
    public void addOrderButtonAction(ActionListener l) {
        inOrderRadioButton.addActionListener(l);
        preOrderRadioButton.addActionListener(l);
        postOrderRadioButton.addActionListener(l);
    }

    public InOrderRadioButton getInOrderRadioButton() {
        return inOrderRadioButton;
    }

    public PreOrderRadioButton getPreOrderRadioButton() {
        return preOrderRadioButton;
    }

    public PostOrderRadioButton getPostOrderRadioButton() {
        return postOrderRadioButton;
    }
    
    
    
}
